<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import { ref } from "vue";
import {storeToRefs} from 'pinia'
// 导入 “myapp” 数据存储模块
import { useAppStore } from './stores/myapp'
// 获取“app”存储对象
const appStore = useAppStore()
// 获取pinia储存中的“菜单”数组
let { width } = storeToRefs(appStore)

</script>
<template>
    <!-- 一级路由出口 -->
    <div class="myapp" :style="`width:${width};`">
        <RouterView />
    </div>
</template>


<style>
.myapp {
    width: 100%;
    margin: 0 auto;
}
</style>
